package main

import "fmt"

func main() {
	//test1()
	//test2()
	test3()
}

func test1() {
	defer fmt.Println("001")
	defer fmt.Println("002")
	defer fmt.Println("003")
}

func test2() {
	for i := 0; i < 5; i++ {
		defer fmt.Printf("i:%v\n", i)
	}
}

func test3() {
	var a int = 0
	a = 0
	defer fmt.Println(a)
	a = 100
	fmt.Println(a)
}
